/**
* _gdk_surface_destroy_hierarchy:
* @surface: a #GdkSurface
- * @recursing: If %TRUE, then this is being called because a parent
- * was destroyed.
* @recursing_native: If %TRUE, then this is being called because a native parent
* was destroyed. This generally means that the call to the
* windowing system to destroy the surface can be omitted, since
**/
static void
_gdk_surface_destroy_hierarchy (GdkSurface *surface,
- gboolean recursing,
- gboolean recursing_native,
gboolean foreign_destroy)
{
GdkSurfaceImplClass *impl_class;
display = gdk_surface_get_display (surface);
- switch (surface->surface_type)
+ if (surface->gl_paint_context)
{
- default:
- g_assert_not_reached ();
- break;
-
- case GDK_SURFACE_TOPLEVEL:
- case GDK_SURFACE_TEMP:
- if (surface->gl_paint_context)
- {
- /* Make sure to destroy if current */
- g_object_run_dispose (G_OBJECT (surface->gl_paint_context));
- g_object_unref (surface->gl_paint_context);
- surface->gl_paint_context = NULL;
- }
+ /* Make sure to destroy if current */
+ g_object_run_dispose (G_OBJECT (surface->gl_paint_context));
+ g_object_unref (surface->gl_paint_context);
+ surface->gl_paint_context = NULL;
+ }
- if (surface->frame_clock)
- {
- g_object_run_dispose (G_OBJECT (surface->frame_clock));
- gdk_surface_set_frame_clock (surface, NULL);
- }
+ if (surface->frame_clock)
+ {
+ g_object_run_dispose (G_OBJECT (surface->frame_clock));
+ gdk_surface_set_frame_clock (surface, NULL);
+ }
- _gdk_surface_clear_update_area (surface);
+ _gdk_surface_clear_update_area (surface);
- impl_class = GDK_SURFACE_IMPL_GET_CLASS (surface->impl);
- impl_class->destroy (surface, recursing_native, foreign_destroy);
+ impl_class = GDK_SURFACE_IMPL_GET_CLASS (surface->impl);
+ impl_class->destroy (surface, foreign_destroy);
- surface->state |= GDK_SURFACE_STATE_WITHDRAWN;
- surface->destroyed = TRUE;
+ surface->state |= GDK_SURFACE_STATE_WITHDRAWN;
+ surface->destroyed = TRUE;
- surface_remove_from_pointer_info (surface, display);
+ surface_remove_from_pointer_info (surface, display);
- g_object_notify_by_pspec (G_OBJECT (surface), properties[PROP_STATE]);
- g_object_notify_by_pspec (G_OBJECT (surface), properties[PROP_MAPPED]);
- break;
- }
+ g_object_notify_by_pspec (G_OBJECT (surface), properties[PROP_STATE]);
+ g_object_notify_by_pspec (G_OBJECT (surface), properties[PROP_MAPPED]);
}
/**
_gdk_surface_destroy (GdkSurface *surface,
gboolean foreign_destroy)
{
- _gdk_surface_destroy_hierarchy (surface, FALSE, FALSE, foreign_destroy);
+ _gdk_surface_destroy_hierarchy (surface, foreign_destroy);
}
/**
void
gdk_surface_destroy (GdkSurface *surface)
{
- _gdk_surface_destroy_hierarchy (surface, FALSE, FALSE, FALSE);
+ _gdk_surface_destroy_hierarchy (surface, FALSE);
g_object_unref (surface);
}
/* Called to do the windowing system specific part of gdk_surface_destroy(),
*
* surface: The window being destroyed
- * recursing: If TRUE, then this is being called because a parent
- * was destroyed. This generally means that the call to the windowing
- * system to destroy the surface can be omitted, since it will be
- * destroyed as a result of the parent being destroyed.
- * Unless @foreign_destroy
* foreign_destroy: If TRUE, the surface or a parent was destroyed by some
* external agency. The surface has already been destroyed and no
* windowing system calls should be made. (This may never happen
* for some windowing systems.)
*/
void (* destroy) (GdkSurface *surface,
- gboolean recursing,
gboolean foreign_destroy);